﻿<%@ WebHandler Language="C#" Class="SysRose_getAll" %>

using System;
using System.Web;
using Newtonsoft.Json;
using System.Collections.Generic;

public class SysRose_getAll : IHttpHandler, System.Web.SessionState.IReadOnlySessionState
{
    
    public void ProcessRequest (HttpContext context) {
 //检验是否登录

        if (!OTS.BaseLogin.validataModule(context, (int)OTS.enumSysRight.SysRose))
        {
            context.Response.ContentType = "text/json";
            context.Response.Write("非法操作！");
            return;

        }
        else
        {
            OTS.Common.Page<OTS.Model.sys_rose> page = new OTS.Common.Page<OTS.Model.sys_rose>();
            OTS.BLL.SysRoseBLL bll = new OTS.BLL.SysRoseBLL();
            List<OTS.Model.sys_rose> list = bll.GetSysRoseList("");
            page.root = list;
            page.success = true;
            context.Response.ContentType = "text/json";
            context.Response.Write(JavaScriptConvert.SerializeObject(page));
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}